﻿using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using DAL;

namespace BLL
{
    public class BillBLL
    {
        public List<Bills> GetBillListBLL(int billType, string beginTime, string endTime, int page, int limit, out int count)
        {
            BllDAL dal = new BllDAL();
            return dal.GetBillListService(billType, beginTime, endTime, page, limit, out count);
        }

        public int SaveBillsInfoBLL(Bills bills)
        {
            BllDAL dal = new BllDAL();
            return dal.SaveBillsInfoService(bills);
        }

        public Bills GetBillssInfoByIdBLL(int id)
        {
            BllDAL dal = new BllDAL();
            return dal.GetBillssInfoByIdService(id);
        }

        public int DeleteBLL(int id)
        {
            BllDAL dal = new BllDAL();
            return dal.DeleteService(id);
        }

        public int DeleteBatchBillsBLL(Bills[] bills)
        {
            BllDAL dal = new BllDAL();
            return dal.DeleteBatchBillsBLLService(bills);
        }
    }
}
